var EXPORTED_SYMBOLS = ["DMS_Connect"];

DMS_GetAll = function(){

};

Components.utils.import("resource://SynoLoader/Command.js");  
Components.utils.import("resource://SynoLoader/Util.js");  
Components.utils.import("resource://SynoLoader/Notification.js"); 

DMS_Connect = new Command();
DMS_Connect.constructor = DMS_GetAll;
DMS_Connect.username="";
DMS_Connect.password="";

DMS_Connect.onsuccess	= function(http_request)
{
  	var mpInfo = JSON.parse(http_request.responseText); 
	if (mpInfo.success == false)
	{
		this.connect=false;
		Util.log("Connect Faild!\n" + http_request.responseText);    
	} 
	else    
	{
		this.connect=true;
	}	
};


 

DMS_Connect.setParameter= function()
{
	DMS_Connect.parameter='action=login&username=' + encodeURIComponent(this.username) + '&passwd=' + encodeURIComponent(this.password);
};


